{% extends "sentry/bases/modal.html" %}
{% load crispy_forms_tags %}
{% load sentry_assets %}
{% load i18n %}

{% block css %}
  <link href="{% asset_url "sentry" "dist/sentry.css" %}" rel="stylesheet"/>
  <style>
    ol li {
      padding:10px 0px;
    }
    .code-list {
      padding: 10px;
      background-color: #f7f8f9;
      margin-top: 10px;
      border-radius: 3px;
    }
    .code-list li {
      font-size: 90%;
    }
  </style>
{% endblock %}

{% block wrapperclass %} narrow auth {% endblock %}
{% block modal_header_signout %} {% endblock %}

{% block title %} {% trans "Jira-Server Setup" %} | {{ block.super }} {% endblock %}

{% block main %}
{% if form %}
<h3>{% trans "Step 2: Connect Sentry with your App" %}</h3>
  <p>{% trans "Add your Jira Server App credentials to Sentry." %}</p>
  <form action="" method="post" class="form-stacked">
    {% csrf_token %}
    <input type="hidden" name="provider" value="jira_server" />

    {{ form|as_crispy_errors }}

    {% for field in form %}
    {{ field|as_crispy_field }}
    {% endfor %}

    <fieldset class="form-actions clearfix">
      <div class="pull-right">
        <a class="btn btn-default" href="{% url "sentry-extension-setup" "jira_server" %}">{% trans "Back to instructions" %}</a>
        <button type="submit" class="btn btn-primary" name="save_mappings" value="url">{% trans "Submit" %}</button>
      </div>
    </fieldset>
  </form>
{% else %}
<h3>{% trans "Step 1: Create a Sentry App in Jira Server" %}</h3>
  <p>{% trans "To configure Jira Server with Sentry, you will need to create a Sentry app in your Jira Server instance." %}</p>
  <ol>
    <li>Coming Soon!</li>
  </ol>
  <p class="alert alert-block flex">
    <i class="icon icon-exclamation"></i>
    {% trans "You must complete the above steps in Jira Server to connect with Sentry." %}
  </p>
  <div class="form-actions clearfix">
    <div class="pull-right">
        <a class="btn btn-primary" href="{% url "sentry-extension-setup" "jira_server" %}?completed_guide">{% trans "Next" %}</a>
    </div>
  </div>
  {% endif %}
{% endblock %}
